Skip to main content

Tutorial: Tour de Whirlpool

Overview

What is Tour de Whirlpool?

Tour de Whirlpool explains how to create programs that interact with Orca Whirlpools. In this tutorial you will learn how to perform the following operations programmatically.

  • Check balances for SOL and tokens
  • Send SOL and tokens
  • Perform swaps with both SOL and tokens
  • Manage Whirlpools positions
    • Open a position
    • Obtain a list of open positions
    • Check position status
    • Increase a position's liquidity
    • Decrease a position's liquidity
    • Harvest fees and rewards from a position
    • Close a position

Target Audience

  • Previous experience using Solana, Orca, and Whirlpools from the web UI
  • Previous experience with Typescript or a similar language

Tools Used

  • Typescript, for example code
  • Node.js, for running examples
  • Phantom, for Wallet actions
  • Solana CLI is used in tandem with Phantom for some Wallet actions
  • Devnet, for network interactions (It's free!)
  • This tutorial explains how to obtain the tokens used in examples

Source Code

🔗 Tour de Whirlpool

https://github.com/everlastingsong/tour-de-whirlpool/

How to get help